<template>
  <div class="type-nav">
    <div class="container">
      <nav class="nav">
        <el-button type="primary">
          <el-link type="primary" href="/">首页</el-link>
        </el-button>
        <el-button type="primary" @click="noticeList">
          <el-link type="primary">招标公告</el-link>
        </el-button>
<!--        <el-button type="primary" @click="tenderList">
          <el-link type="primary">招标信息</el-link>
        </el-button>-->
        <el-button type="primary" @click="procurementPlan">
          <el-link type="primary">采购信息</el-link>
        </el-button>
        <el-button type="primary" @click="routerCecBid">
          <el-link type="primary">政策法规</el-link>
        </el-button>
<!--        <el-button type="primary">
          <el-link type="primary">帮助中心</el-link>
        </el-button>-->
        <el-button type="primary" @click="contactUs">
          <el-link type="primary">联系我们</el-link>
        </el-button>
        <el-button type="primary" @click="officialWebsite">
          <el-link type="primary">企业官网</el-link>
        </el-button>
<!--        <el-button type="primary">
          <el-link type="primary">办理CA</el-link>
        </el-button>-->
        <el-button type="primary" @click="dian">
          <el-link type="primary">供应商中心</el-link>
        </el-button>
      </nav>
      <el-dialog
          :visible.sync="dialogVisible"
          width="650px">
        <Login @update:visible="handleDialogVisibleChange"></Login>
      </el-dialog>
    </div>
  </div>
</template>

<script>
import Login from '@/components/login/Login.vue'

export default {
  name: 'TypeNav',
  components: {
    Login
  },
  data() {
    return {
      dialogVisible: false
    }
  },
  methods: {
    dian() {
      if (sessionStorage.getItem("token") == null) {
        this.dialogVisible = true
      } else {
        this.$router.push("/mine")
      }
    },
    //联系我们
    contactUs(){
      this.$router.push("/contactUs")
    },
    //招标信息
    tenderList(){
      this.$router.push("/tenderList")
    },
    //采购信息
    procurementPlan(){
      this.$router.push("/procurementPlan")
    },
    //招标公告信息
    noticeList(){
      this.$router.push("/noticeList")
    },
    handleDialogVisibleChange(newValue) {
      this.dialogVisible = newValue;
    },
    routerCecBid(){
      window.open('https://info.cecbid.org.cn/list/52.html', '_blank');
    },
    officialWebsite(){
      window.open('https://www.ssge.com.cn', '_blank');
    },
  }
}
</script>

<style lang="less" scoped>
.type-nav {
  //border-bottom: 2px solid #fff;

  .container {
    width: 1400px;
    margin: 0 auto;
    display: flex;
    position: relative;
    background-color: #0065B5;
    box-shadow: 0 2px 12px 0 #3a8ee6d6;

    a {
      height: 36px;
      margin: 0 20px;
      line-height: 45px;
      font-size: 16px;
      color: #FFF;
    }
  }

  .el-button--primary {
    color: #FFF;
    background-color: #0065B5;
    border-color: #0065B5;
  }
}

</style>
